package com.masterrabbit.mcslf.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 商户信息审核表
 * @TableName merchant_reviews
 */
@TableName(value ="merchant_reviews")
@Data
public class MerchantReviews implements Serializable {
    /**
     * 审核记录ID（自增）
     */
    @TableId(type = IdType.AUTO)
    private Integer reviewId;

    /**
     * 商户ID（关联merchants表）
     */
    private Integer merchantId;

    /**
     * 商户编号（商家ID）
     */
    private Integer merchantCode;

    /**
     * 负责人姓名
     */
    private String contactName;

    /**
     * 身份证号
     */
    private String idCardNumber;

    /**
     * 营业执照编号
     */
    private String businessLicenseNumber;

    /**
     * 店名
     */
    private String shopName;

    /**
     * 手机号
     */
    private String phoneNumber;

    /**
     * 经营区域
     */
    private String businessArea;

    /**
     * 详细地址
     */
    private String detailedAddress;

    /**
     * 身份证正反照ID（外键图片ID）
     */
    private Integer idCardImageId;

    /**
     * 营业执照照片ID（外键图片ID）
     */
    private Integer businessLicenseImageId;

    /**
     * 门面照片ID（外键图片ID）
     */
    private Integer storefrontImageId;

    /**
     * 经度
     */
    private BigDecimal longitude;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 审核状态（1-待审核 2-审核通过 3-审核拒绝）
     */
    private Integer auditStatus;

    /**
     * 营业时间
     */
    private String businessHours;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 店铺余额
     */
    private BigDecimal shopBalance;

    /**
     * 审核人ID（外键，关联审核管理员）
     */
    private Integer reviewerId;

    /**
     * 审核时间
     */
    private Date reviewTime;

    /**
     * 提交审核时间
     */
    private Date submitTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MerchantReviews other = (MerchantReviews) that;
        return (this.getReviewId() == null ? other.getReviewId() == null : this.getReviewId().equals(other.getReviewId()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getMerchantCode() == null ? other.getMerchantCode() == null : this.getMerchantCode().equals(other.getMerchantCode()))
            && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName()))
            && (this.getIdCardNumber() == null ? other.getIdCardNumber() == null : this.getIdCardNumber().equals(other.getIdCardNumber()))
            && (this.getBusinessLicenseNumber() == null ? other.getBusinessLicenseNumber() == null : this.getBusinessLicenseNumber().equals(other.getBusinessLicenseNumber()))
            && (this.getShopName() == null ? other.getShopName() == null : this.getShopName().equals(other.getShopName()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
            && (this.getBusinessArea() == null ? other.getBusinessArea() == null : this.getBusinessArea().equals(other.getBusinessArea()))
            && (this.getDetailedAddress() == null ? other.getDetailedAddress() == null : this.getDetailedAddress().equals(other.getDetailedAddress()))
            && (this.getIdCardImageId() == null ? other.getIdCardImageId() == null : this.getIdCardImageId().equals(other.getIdCardImageId()))
            && (this.getBusinessLicenseImageId() == null ? other.getBusinessLicenseImageId() == null : this.getBusinessLicenseImageId().equals(other.getBusinessLicenseImageId()))
            && (this.getStorefrontImageId() == null ? other.getStorefrontImageId() == null : this.getStorefrontImageId().equals(other.getStorefrontImageId()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
            && (this.getBusinessHours() == null ? other.getBusinessHours() == null : this.getBusinessHours().equals(other.getBusinessHours()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getShopBalance() == null ? other.getShopBalance() == null : this.getShopBalance().equals(other.getShopBalance()))
            && (this.getReviewerId() == null ? other.getReviewerId() == null : this.getReviewerId().equals(other.getReviewerId()))
            && (this.getReviewTime() == null ? other.getReviewTime() == null : this.getReviewTime().equals(other.getReviewTime()))
            && (this.getSubmitTime() == null ? other.getSubmitTime() == null : this.getSubmitTime().equals(other.getSubmitTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReviewId() == null) ? 0 : getReviewId().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getMerchantCode() == null) ? 0 : getMerchantCode().hashCode());
        result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode());
        result = prime * result + ((getIdCardNumber() == null) ? 0 : getIdCardNumber().hashCode());
        result = prime * result + ((getBusinessLicenseNumber() == null) ? 0 : getBusinessLicenseNumber().hashCode());
        result = prime * result + ((getShopName() == null) ? 0 : getShopName().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        result = prime * result + ((getBusinessArea() == null) ? 0 : getBusinessArea().hashCode());
        result = prime * result + ((getDetailedAddress() == null) ? 0 : getDetailedAddress().hashCode());
        result = prime * result + ((getIdCardImageId() == null) ? 0 : getIdCardImageId().hashCode());
        result = prime * result + ((getBusinessLicenseImageId() == null) ? 0 : getBusinessLicenseImageId().hashCode());
        result = prime * result + ((getStorefrontImageId() == null) ? 0 : getStorefrontImageId().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        result = prime * result + ((getBusinessHours() == null) ? 0 : getBusinessHours().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getShopBalance() == null) ? 0 : getShopBalance().hashCode());
        result = prime * result + ((getReviewerId() == null) ? 0 : getReviewerId().hashCode());
        result = prime * result + ((getReviewTime() == null) ? 0 : getReviewTime().hashCode());
        result = prime * result + ((getSubmitTime() == null) ? 0 : getSubmitTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", reviewId=").append(reviewId);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", merchantCode=").append(merchantCode);
        sb.append(", contactName=").append(contactName);
        sb.append(", idCardNumber=").append(idCardNumber);
        sb.append(", businessLicenseNumber=").append(businessLicenseNumber);
        sb.append(", shopName=").append(shopName);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", businessArea=").append(businessArea);
        sb.append(", detailedAddress=").append(detailedAddress);
        sb.append(", idCardImageId=").append(idCardImageId);
        sb.append(", businessLicenseImageId=").append(businessLicenseImageId);
        sb.append(", storefrontImageId=").append(storefrontImageId);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", businessHours=").append(businessHours);
        sb.append(", userId=").append(userId);
        sb.append(", shopBalance=").append(shopBalance);
        sb.append(", reviewerId=").append(reviewerId);
        sb.append(", reviewTime=").append(reviewTime);
        sb.append(", submitTime=").append(submitTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}